#include"workerthread.h"

EpollReactor *workerthread::GetReactor()
{
    return this->reactor;
}

void workerthread::threadruning(workerthread *thread)
{
    thread->thread_id=this_thread::get_id();  //设置id
    thread->GetReactor()->run();
}

void workerthread::run()
{
    pa=new thread(threadruning,this);
}

workerthread::workerthread()
{
     this->reactor=new EpollReactor();
}

workerthread::~workerthread()
{   
    delete pa;
}
